﻿/* *********************************************
 * Crypto libary : Maths module
 * Christiaan Rakowski 20110825
 * This module contains several mathematical helper methods used by this library
 * ********************************************/

using System;

namespace CryptoCs
{
	public class Maths
	{
		public static int Mod(int a, int b)
		{
			while (a < 0)
			{
				a = b - Math.Abs(a);
			}
			return (a % b);
		}
	}
}
